<?php

/**
 * Created by PhpStorm.
 * Author: netman
 * Time: 2023/10/18 14:47
 * Desc:邮轮参数验证
 */
class Request_Api_V2_Ship extends Request_Api_V2_Base
{
    public function __construct($request_param)
    {
        parent::__construct($request_param);
    }
    public function ship_line_list()
    {
        $this->rules = [
            ['page', ['not_empty','digit',$this->rule_min(1)]],
            ['pagesize', ['not_empty','digit',$this->rule_min(1)]],
        ];
        return $this;
    }

    public function ship_line_info()
    {
        $this->rules = [
            ['line_id', ['not_empty','digit']],
        ];
        return $this;
    }
    public function date_suit()
    {
        $this->rules = [
            ['line_id', ['not_empty','digit']],
            ['day', ['not_empty', $this->rule_date_format('Y-m-d')]],
        ];
        return $this;
    }
    public function ship_line_voyage()
    {
        $this->rules = [
            ['line_id', ['not_empty','digit']],
        ];
        return $this;
    }
    public function ship_line()
    {
        $this->rules = [
            ['ship_id', ['not_empty','digit']],
        ];
        return $this;
    }
    public function ship_line_additional()
    {
        $this->rules = [
            ['line_id', ['not_empty','digit']],
        ];
        return $this;
    }
    public function all_ship_line()
    {
        $this->rules = [
            ['shipid', ['not_empty','digit']],
        ];
        return $this;
    }
    public function index_ship_list()
    {
        return $this;
    }
    public function index_ship_common()
    {
        return $this;
    }
    public function index_ship_line_list()
    {
        return $this;
    }
    public function index_top_ads()
    {
        return $this;
    }
    public function ship_search_list()
    {
        $this->rules = [
            ['page', ['not_empty','digit',$this->rule_min(1)]],
            ['pagesize', ['not_empty','digit',$this->rule_min(1)]],
        ];
        return $this;
    }
    public function company_list()
    {
        return $this;
    }
    public function ship_info()
    {
        $this->rules = [
            ['ship_id', ['not_empty','digit',$this->rule_min(1)]]
        ];
        return $this;
    }
    public function company_hot_product()
    {
        return $this;
    }
    public function order_contract()
    {
        return $this;
    }
    public function create_order()
    {
        $this->rules = [
            ['line_id', ['not_empty', 'digit', $this->rule_min(1)]],
            ['linkman', ['not_empty']],
            ['linktel', ['not_empty', 'phone']],
            ['date', ['not_empty', $this->rule_date_format('Y-m-d')]],

        ];
        //自定义规则
        $this->validation->rule('mid',array('Rule_Member','need_member'));
        return $this;
    }
    public function index_search_hot_line()
    {
        return $this;
    }
    public function index_search_company_list()
    {
        return $this;
    }
    public function index_common_list()
    {
        return $this;
    }
    public function index_special_list()
    {
        return $this;
    }
    public function date_list()
    {
        $this->rules = [
            ['day', ['not_empty', $this->rule_date_format('Y-m-d')]],
        ];
        return $this;
    }
    public function company_info()
    {
        $this->rules = [
            ['supplier_id', ['not_empty', 'digit']],
        ];
        return $this;
    }
}